package com.siebre.picclife.asynctask.service.support;

import com.google.common.base.Predicate;

/**
 * 
 * @author ZhangChi
 * @since 2015年4月9日
 *
 */
public interface TaskArgumentHandlerRegistry {

	/**
	 * Register serializer/deserializer for specified task type
	 * 
	 * @param type task type
	 * @param serializer
	 */
	void register(String taskType, ArgumentSerializer serializer, ArgumentDeserializer deserializer);
	
	/**
	 * Register serializer/deserializer for specified argument type
	 * 
	 * @param argumentType
	 * @param serializer
	 */
	void register(Class<?> argumentType, ArgumentSerializer serializer, ArgumentDeserializer deserializer);
	
	void register(Predicate<Class<?>> argumentTypePredicate, ArgumentSerializer serializer, ArgumentDeserializer deserializer);

}
